home *** CD-ROM | disk | FTP | other *** search
- #
- # a command that should be called periodically for sending out
- # queued mail messages
- #
-
- require "ctime.pl";
-
- select((select(STDOUT), $| = 1)[0]);
-
- print "==============================\n";
- print &ctime(time),"\n";
- opendir(QUE,"MAILQUEUE") || die "MAILQUEUE not found!\n";
- @mdir=readdir(QUE);
- close(QUE);
-
- for (@mdir) {
- next if $_ eq '.';
- next if $_ eq '..';
- print "Dealing with MAILQUEUE/$_\n";
- system("SENDMAIL MAILQUEUE/$_");
- unlink("MAILQUEUE/$_");
- }
-